<?php

use yii\helpers\Url;

/* @var $this \yii\web\View */
/* @var $content string */
/* @var \common\models\Check[] $list */

if($type == 1){
    $title = '购买申请';
}elseif($type == 2){
    $title = '补贴申请';
}
$this->title = $title;
?>
<section class="app-container app-order">

    <?php
    foreach($list as $k => $model){
        ?>
        <a class="app-order-item" href="<?= Url::toRoute(['member/buy-info', 'id' => $model->id]) ?>">
            <div class="app-order-item-infos">
                <h3><?= $title ?>：<?= Yii::$app->user->identity->getUsername() ?></h3>
                <p>申请时间：<?= date('Y-m-d H:i:s', $model->created_at) ?></p>
                <?php
                if($type == 2){
                    ?>
                    <p>备注信息：<?= $model->remark ?></p>
                    <?php
                }
                ?>
                <div class="clearfix">
                    <?php
                    if( $model->times == 3 ){
                        ?>
                        <span class="pull-right app-status-success">已通过</span>
                        <?php
                    }elseif( $model->times == -1 ){
                        ?>
                        <span class="pull-right app-status-success">未通过</span>
                        <?php
                    }else{
                        ?>
                        <span class="pull-right app-status-success">审核中</span>
                        <?php
                    }
                    ?>
                </div>
            </div>
        </a>
        <?php
    }
    ?>

</section>
